Conditional codex_home dotenv#29959
Conversation
b1bc29d to
62b7f8e
Compare
62b7f8e to
11e2f5e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ee0094995
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ae71ffce3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Adds conditional dotenv overlays under
CODEX_HOME. After loading the current.env, Codex discovers.env.*files in lexicographic order and applies each overlay when its TCP condition passes.Evaluation and environment mutation occur during single-threaded startup, before Codex creates its runtime, workers, sessions, or network clients.
Supported behavior
hostandport.from.not.# codex-env-unset.~or a case-insensitive final suffix ofbak,back,backup,bkp,old,orig,original,save,saved,disable,disabled,inactive,off,tmp,temp,swp,swo,example,sample,template, ordist.CODEX_*variables.Files without a
# codex-env-if:directive as their first non-empty line are ignored.Usage
Set variables when an endpoint is reachable:
Unset variables when the endpoint is unreachable:
Each overlay is evaluated independently. A full Codex restart is required after changing overlays or moving between networks.
The timeout bounds TCP connection attempts but does not bound synchronous DNS resolution.
Testing
just test -p codex-arg0For manual validation:
CODEX_*variables remain unchanged.Future ideas:
all,any, and arbitrarily nestednot.